<div ng-controller="TodayController" class="today-ye main">
    <div class="specifyyy">
        <a class="special" href="#/welfareAssociation">本期专场</a>
        <span>
            <em>/</em>
            <a class="today" href="#">{{titles}}</a>
        </span>
    </div>
    <div class="bargain">
        <div class="bargain-left">
            <a href="#/shangpinxiangqin">
                <img src="{{tops.img}}"
                     title="{{tops.img_title}}">
            </a>
        </div>
        <div class="bargain-right">
            <div class="countdown">距结束还剩&nbsp;&nbsp;<span></span>&nbsp;&nbsp;天&nbsp;&nbsp;<span></span>&nbsp;&nbsp;小时&nbsp;&nbsp;<span></span>&nbsp;&nbsp;分&nbsp;&nbsp;<span></span>&nbsp;&nbsp;秒</div>
            <a href="#/shangpinxiangqin" class="jieshao" title="{{tops.jieshao_title}}">{{tops.jieshao}}</a>
            <span class="jiake">￥<span>{{tops.jiake}}</span></span>
            <a href="#/shangpinxiangqin" class="xiangqing"><span>商品详情</span></a>
        </div>
    </div>
    <div class="goods-lis-today">
        <div class="goods-situation" ng-repeat="arr in data">
            <img src="{{arr.img}}"
                 title="{{arr.jieshao}}{{arr.jieshao_title}}">
            <a href="" title="{{arr.jieshao}}{{arr.jieshao_title}}">{{arr.jieshao}}</a>
            <span class="jiake1">￥<span>{{arr.jiake}}</span></span>
        </div>
    </div>
</div>
<script>

    var finishTime=new Date("2016-12-25 21:30:00");
    function daojishi() {
        var now=new  Date();
        var miao=(finishTime-now)/1000;//因为时间计算的是毫秒，所以除以1000求得秒数
        var hours=parseInt(miao/3600);//一小时等于3600秒，除以然后取整
        var tianshu=parseInt(hours/24); //小时除以24求天数
        var hour=parseInt(hours%24);//求余数，多少小时
        hour = timePanelTool(hour);//单位数时前面加零
        tianshu=timePanelTool(tianshu);//单位数时前面加零
        var minutes=parseInt((miao%3600)/60);//一分钟等于60秒，余数除以60就等于多少分钟
        minutes=timePanelTool(minutes);
        var seconds=parseInt(Math.round((miao%3600)%60));
        seconds = timePanelTool(seconds);
        $(".countdown").children(0).text(tianshu).next().text(hour).next().text(minutes).next().text(seconds);
    }
    function timePanelTool(data) {
        var t=data.toString();
        return t.length==1?"0"+t:t;
    }
    setInterval(daojishi,1000);

</script>